package com.yj.web.config;

import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * Created by a1 on 2017/3/2.
 */

//@Configuration
//@EnableSwagger2
//@ComponentScan(basePackages = "com.yj.web.controllers")
public class SwaggerConfig extends WebMvcConfigurationSupport {
    @Bean
    public Docket add() {
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfo(
                "title",
                "描述",
                "版本",
                "eradsf",
                "阿迪舒服",
                "asdf",
                "阿方索地方"
        );
        docket.apiInfo(apiInfo);
        return docket;
    }
}
